/***************************************************************************
 *   Copyright (C) 2004 by cyril dupuit                                    *
 *   cyrildupuit@hotmail.com                                               *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

//*****************************************************************************
// Nom du module : Dentry.h
// Description : Ce module est utilise pour gerer le system de fichiers virtuel
//*****************************************************************************
 
// Historique :
// 25/01/05 : Creation du module V1.0

#include "Kernel/Types.h"
#include "Lib/LinkList.h"
#include "Lib/Queue.h"

#ifndef VFS_DENTRY_HEADER
#define VFS_DENTRY_HEADER

//*****************************************************************************

#define DENTRY_HASH_TABLE_SIZE  50
#define DENTRY_UNUSED_COUNT	50

//*****************************************************************************

struct VfsDentry;

//*****************************************************************************

struct DentryNode{
	struct VfsDentry	* pNext;//Pointeur sur le descripteur suivant
	struct VfsDentry	* pPrev;//Pointeur sur le descripteur precedent
	};

//*****************************************************************************

struct VfsDentry {
	struct DentryNode	Hash;
	struct VfsDentry	* pParent;
	struct VfsDentry	* pFirstChild;
	struct VfsDentry	* pLastChild;
	struct DentryNode	Mnt;
	Count_t			MntCount;
	Status_t		StatuReg;
	struct VfsDentry	* pNext;
	struct VfsDentry	* pPrev;
	char 			* pName;
	};

//*****************************************************************************

typedef struct {
		char * pName;
		struct VfsMount * pMnt;
		unsigned int	Level;
		Status_t Status;
		} VfsDentryTree_t;

//*****************************************************************************

//*****************************************************************************
// But de la fonction : Initialiser la destion des dentry
// Entree : Aucune
// Parametre retourne : TRUE
//*****************************************************************************
Status_t VfsDentryInit(void);

//*****************************************************************************

#endif
